package com.portal.framework.dao;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.portal.system.parameter.ParameterService;
import com.portal.system.parameter.dto.ParameterDTO;



public class ParameterCatch {
	private static ParameterService parameterService;

	
	//所有参数集合map缓存
	public static Map<String,String> parameterMap=new HashMap<String,String>();
	
	
	public static void inne(){
		
	    List<ParameterDTO> parameterDTOS=parameterService.findAll();
	    if(parameterDTOS !=null){
			for (Iterator<ParameterDTO> iterator = parameterDTOS.iterator(); iterator
					.hasNext();) {
				ParameterDTO parameterDTO = (ParameterDTO) iterator.next();
				parameterMap.put(parameterDTO.getName(), parameterDTO.getParaValue());
			}
		}
	    
	}

	public static ParameterService getParameterService() {
		return parameterService;
	}

	public static void setParameterService(ParameterService parameterService) {
		ParameterCatch.parameterService = parameterService;
	}

	
}

		